package com.choosefine.base.common

import com.choosefine.base.common.bean.BaseToolkitBean
import com.choosefine.base.common.bean.HttpBean
import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.client.RestTemplate
import org.springframework.web.util.DefaultUriTemplateHandler
import org.springframework.web.util.UriTemplateHandler

/**
 * Created by 邱鹏 on 2017/6/8.
 */
@Configuration
open class BeanRegister {
    private val LOGGER = LoggerFactory.getLogger(BeanRegister::class.java)

    @Bean open fun http(): HttpBean {
        return HttpBean()
    }

    @Bean open fun toolkit(): ToolkitBean {
        return ToolkitBean()
    }

    @Bean open fun base(): BaseToolkitBean {
        return BaseToolkitBean()
    }

    @Bean open fun restTemplate(): RestTemplate {
        return RestTemplate()
    }

    @Bean open fun uriTemplateHandler(): UriTemplateHandler {
        return DefaultUriTemplateHandler()
    }

}